package com.demo;


public class demo {

    public static void main(String[] args) {
        int[] arr = new int[3];
        System.out.println(arr);
        for(int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }

        System.out.println(getMax(10,12));
        int[] arr2 = {0,1,2,3,5};
        reserve(arr2);
        System.out.println( add(arr2));
    }
    public static String add(int[] a){
        String start = "[";
        for(int i=0;i<a.length;i++){
            start += a[i] + ", ";
        }
        return start + "]";
    }
    public static int getMax(int a,int b){
        return a > b ? a : b;
    }

    public static void reserve(int[] arr){
        for(int start=0,end=arr.length-1;start<=end;start++,end--){
                int temp = arr[start];
                arr[start] = arr[end];
                arr[end] = temp;
        }
    }

}
